.ui-switch {
    cursor: pointer;
    user-select: none;
    position: relative;
    width: 40px;
    height: 24px;
    display: inline-block;
    border-radius: 12px;
    border: 1px solid #dfdfdf;

    &::before {
        content: " ";
        background-color: #007aff;
        height: 26px;
        border-radius: 12px;
        position: absolute;
        top: -1px;
        left: -1px;
        transition-property: width;
        transition-duration: 300ms;
    }

    &::after {
        content: " ";
        width: 24px;
        height: 24px;
        border-radius: 50%;
        background-color: #fff;
        box-shadow: 0 1px 3px rgba(0, 0, 0, .4);
        position: absolute;
        top: 0;
        transition-property: left;
        transition-duration: 300ms;
    }

    &.off {
        background-color: #ffffff;

        &::before {
            width: 25.6px;
        }

        &::after {
            left: 0;
        }
    }

    &.on {
        &::before {
            width: 41.6px;
        }

        &::after {
            left: 16px;
        }
    }
}